package com.cropflow.repository;

import com.cropflow.entity.MaintenanceRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MaintenanceRepository extends JpaRepository<MaintenanceRecord, Long> {
    
    List<MaintenanceRecord> findByVehicleIdOrderByStartTimeDesc(Long vehicleId);
    
    List<MaintenanceRecord> findByType(MaintenanceRecord.MaintenanceType type);
}